<template>
    <div>
        <ul>
            <li v-for="data in datalist" :key="data" @click="handleClick">{{data}}</li>
        </ul>
    </div>
</template>

<script>
import { inject, ref } from 'vue'
export default {
    setup() {
        const datalist = ref(['aaa', 'bbb', 'ccc', 'ddd',])
        const which = inject('which')
        const show = inject('show')
        const handleClick = () => {
            which.value = 'Child'
        }
        return {
            datalist, handleClick
        }
    }
}
</script>